<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="apple-mobile-web-app-title" content="阿福易购">
    <meta content="telephone=no" name="format-detection" />
    <meta content="email=no" name="format-detection" />
    <!-- uc、qq浏览器 -->
    <meta name="screen-orientation" content="portrait">
    <meta name="full-screen" content="yes">
    <meta name="browsermode" content="application">
    <meta name="x5-orientation" content="portrait">
    <meta name="x5-fullscreen" content="true">
    <meta name="x5-page-mode" content="app">
    <meta name="HandheldFriendly" content="true">
    <meta name="MobileOptimized" content="320">
    <meta name="csrf-token" content="{{ csrf_token() }}" />
    <meta name="keywords" content="{{$SEO['keywords']}}"/>
    <meta name="description" content="{{$SEO['description']}}"/>
    <title>我的优惠券_{{$SEO['title']}}</title>
    <link rel="stylesheet" href="{{ asset('/build/css/app.min.css') }}">
</head>
<body ontouchstart="">


@inject('pictureService','App\Interfaces\PictureService')

@inject('couponService','App\Interfaces\CouponService')


<header class="ui-header ui-header-stable    af-header">
    <ul class="ui-row-flex">
        <li class="ui-col ui-flex ui-flex-pack-start">
            <i data-href="/user" class="ui-icon-return af-icon-home"></i>
        </li>
        <li class="ui-col ui-flex ui-flex-pack-center">
            <h1>我的优惠券</h1>
        </li>
        <li class="ui-col ui-flex ui-flex-pack-end">

        </li>
    </ul>
</header>

<div class="ui-container" >
    <div class="ui-tab ui-my-order-tab">

        <ul class="ui-tab-nav ui-border-b">
            <li @if(empty($search['type_status']) || $search['type_status']=='1') class="cur current" @endif><a href="/my/coupon?type_status=1"> 未使用</a></li>
            <li @if(!empty($search['type_status']) && $search['type_status']==2) class="cur current" @endif><a href="/my/coupon?type_status=2"> 已使用</a></li>
            <li @if(!empty($search['type_status']) && $search['type_status']==3) class="cur current" @endif><a href="/my/coupon?type_status=3"> 已失效</a></li>
        </ul>

        <?php
            $skin='stamp01';
            $type=1;
            if(empty($search['type_status']) || $search['type_status']=='1'){
                $skin='stamp01';
            }
            if(!empty($search['type_status']) && $search['type_status']==2){
                $skin='stamp02';
                $type=2;
            }
            if(!empty($search['type_status']) && $search['type_status']==3){
                $skin='stamp05';
                $type=3;
            }
        ?>
        <ul class="ui-tab-content" style="margin-top:10px;">
            <li>
                <ul class="my-coupon">

                    @foreach($user_coupon as $item)

                    <li>
                        <!-- 效果1 begin -->
                        <div class="stamp {{$skin}}">
                            <div class="par"><p>阿福易购</p><sub class="sign">￥</sub><span>{{$item->value}}</span><p>订单满{{$item->limit_fir}}元</p></div>
                            <div class="copy">副券<p><?php $date = date_create($item->start_time);echo date_format($date, 'Y-m-d'); ?><br><?php $date = date_create($item->end_time);echo date_format($date, 'Y-m-d'); ?></p></div>
                            <i></i>
                            @if($type==2)
                                <span class="ui-already-receive" style="background-image:url(/build/images/icon-used.png)"></span>
                            @elseif($type==3)
                                <span class="ui-already-receive" style="background-image:url(/build/images/icon-shixiao.png)"></span>
                            @endif
                        </div>
                        <!-- 效果1 end -->
                    </li>

                    @endforeach

                </ul>
            </li>
        </ul>
    </div>

</div>
<footer>

</footer>
<script src="{{ asset('/build/lib/zepto.min.js') }}"></script>
<script src="{{ asset('/build/js/frozen.js') }}"></script>
<script src="{{ asset('/build/js/app.min.js') }}"></script>
</body>
</html>